package com.lmwyc.bean;

public class Area {
	private String create_by;
	private String creation_date;
	private int id;
	private String last_update;
	private String last_update_by;
	private String latitude;
	private String longitude;
	private String office;
	private String onwership_place;
	private String ship_place_ind;

	public String getCreate_by() {
		return create_by;
	}

	public void setCreate_by(String create_by) {
		this.create_by = create_by;
	}

	public String getCreation_date() {
		return creation_date;
	}

	public void setCreation_date(String creation_date) {
		this.creation_date = creation_date;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getLast_update() {
		return last_update;
	}

	public void setLast_update(String last_update) {
		this.last_update = last_update;
	}

	public String getLast_update_by() {
		return last_update_by;
	}

	public void setLast_update_by(String last_update_by) {
		this.last_update_by = last_update_by;
	}

	public String getLatitude() {
		return latitude;
	}

	public void setLatitude(String latitude) {
		this.latitude = latitude;
	}

	public String getLongitude() {
		return longitude;
	}

	public void setLongitude(String longitude) {
		this.longitude = longitude;
	}

	public String getOffice() {
		return office;
	}

	public void setOffice(String office) {
		this.office = office;
	}

	public String getOnwership_place() {
		return onwership_place;
	}

	public void setOnwership_place(String onwership_place) {
		this.onwership_place = onwership_place;
	}

	public String getShip_place_ind() {
		return ship_place_ind;
	}

	public void setShip_place_ind(String ship_place_ind) {
		this.ship_place_ind = ship_place_ind;
	}
	
	/**
	 * 2019.04.16更新，公司新增加打卡地址有效范围配置错误(本应该仅为数字，结果配置为包含单位：米)
	 * 
	 * @return
	 */
	public int getShipPlaceInd() {
		if (ship_place_ind == null || ship_place_ind.trim().length() == 0) {
			return 0;
		}
		String temp = ship_place_ind.replaceAll("[^\\d]", "");
		if (temp != null && temp.trim().length() > 0) {
			return Integer.parseInt(temp.trim());
		} else {
			return 0;
		}
	}

	@Override
	public String toString() {
		return "Area [create_by=" + create_by + ", creation_date=" + creation_date + ", id=" + id + ", last_update="
				+ last_update + ", last_update_by=" + last_update_by + ", latitude=" + latitude + ", longitude="
				+ longitude + ", office=" + office + ", onwership_place=" + onwership_place + ", ship_place_ind="
				+ ship_place_ind + "]";
	}

}
